import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/muyuan";

// 查询用户列表
export function listInfo(query) {
  return request({
    url: '/system/info/driver/list',
    method: 'get',
    params: query
  })
}


// 查询用户信息详细
export function getInfo(userInfoId) {
  return request({
    url: '/system/info/' + userInfoId,
    method: 'get'
  })
}
export function checkPhone(data){
  return request({
    url: '/system/info/check/phone',
    method: 'post',
    data
  })
}
export function checkUserName(data){
  return request({
    url: '/system/info/check/userName',
    method: 'post',
    data
  })
}
export function checkIdNumber(data){
  return request({
    url: '/system/info/check/id/number',
    method: 'post',
    data
  })
}

// 新增用户信息
export function addInfo(data) {
  return request({
    url: '/system/info',
    method: 'post',
    data: data
  })
}

// 修改用户信息
export function updateInfo(data) {
  return request({
    url: '/system/info',
    method: 'put',
    data: data
  })
}
export function updateAccountInfo(data) {
  return request({
    url: '/system/info/driver/account',
    method: 'put',
    data: data
  })
}

// 删除用户信息
export function delInfo(userInfoId) {
  return request({
    url: '/system/info/' + userInfoId,
    method: 'delete'
  })
}
